<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('专家信息列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row" id="zhuanjia">

            <!--登录信息-->
            <input name="userid" th:value="${session.userid}" type="hidden" id="userid">
            <input name="username" th:value="${session.username}" type="hidden" id="username">
            <input name="deptid" th:value="${session.deptid}" type="hidden" id="deptid">
            <input name="olddeptid" th:value="${session.olddeptid}" type="hidden" id="olddeptid">

            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>姓名：</label>
                                <input type="text" v-model="xingming"/>
                            </li>
                            <li>
                                <label>国籍：</label>
                                <select name="guoji" th:with="type=${@dict.getType('sys_guojiahuodiqu')}" v-model="guoji" class="form-control" type="text">
                                    <option value="">请选择</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <label>证件类型：</label>
                                <select name="zhengjianleixing" th:with="type=${@dict.getType('sys_zhengjianleixing')}" v-model="zhengjianleixing" class="form-control" type="text">
                                    <option value="">请选择</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <label>证件号码：</label>
                                <input type="text" v-model="zhengjianhaoma"/>
                            </li>
                            <li>
                                <label>入选年份：</label>
                                <input type="text" v-model="ruxuannianfen"/>
                            </li>
                            <li>
                                <label>工作单位：</label>
                                <input type="text" v-model="gongzuodanwei"/>
                            </li>
                            <li>
                                <label>专家状态：</label>
                                <select name="zhuanjiazhuangtai" th:with="type=${@dict.getType('sys_zhuanjiazhuangtai')}" v-model="zhuanjiazhuangtai" class="form-control" type="text">
                                    <option value="">请选择</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                    <option value="8">人事关系转出</option>
                                </select>
                            </li>
                            <li>
                                <label style="width: 100px;">状态变动时间：</label>
                                <input type="text" class="time-input" placeholder="请选择状态变动时间" v-model="zhuangtaibiandongshijian"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" @click="bindZhuanjiaList"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">

            </div>

            <div class="col-sm-12 select-table table-striped">
                <table class="table table-hover table-primary table-striped">
                    <thead>
                        <tr>
                            <th style="text-align: center; vertical-align: middle;">序号</th>
                            <th style="text-align: center; vertical-align: middle;">专家</th>
                            <th style="text-align: center; vertical-align: middle;">特贴发放管理单位</th>
                            <th style="text-align: center; vertical-align: middle;">工作单位</th>
                            <!--<th style="text-align: center; vertical-align: middle;">转自单位</th>-->
                            <th style="text-align: center; vertical-align: middle;">国籍</th>
                            <!--<th style="text-align: center; vertical-align: middle;">出生日期</th>-->
                            <th style="text-align: center; vertical-align: middle;">入选年份</th>
                            <!--<th style="text-align: center; vertical-align: middle;">证件类型</th>
                            <th style="text-align: center; vertical-align: middle;">证件号码</th>-->
                            <th style="text-align: center; vertical-align: middle;">专家状态</th>
                            <th style="text-align: center; vertical-align: middle;">专家变动时间</th>
                            <!--<th style="text-align: center; vertical-align: middle;">帐号信息</th>-->
                            <th style="text-align: center; vertical-align: middle;">联系方式</th>
                            <th style="text-align: center; vertical-align: middle;">操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr v-for="(zhuanjiaitem,index) in zhuanjialist"  v-if="zhuanjialist.length > 0">
                            <td style="vertical-align: middle; text-align: center;" v-text="index+1"></td>
                            <td style="vertical-align: middle; text-align: center;"><a v-text="zhuanjiaitem.xingming" @click="toShowHistory(zhuanjiaitem.zhuanjiaid)"></a></td>
                            <td style="vertical-align: middle; text-align: center;" v-text="zhuanjiaitem.jigoumingcheng"></td>
                            <td style="vertical-align: middle; text-align: center;" v-text="zhuanjiaitem.gongzuodanwei"></td>
                            <!--<td style="vertical-align: middle; text-align: center;" v-text="zhuanjiaitem.gongzuodanwei"></td>-->
                            <td style="vertical-align: middle; text-align: center;" v-text="zhuanjiaitem.guoji_text"></td>
                            <!--<td style="vertical-align: middle; text-align: center;" v-text="zhuanjiaitem.chushengriqi"></td>-->
                            <td style="vertical-align: middle; text-align: center;" v-text="zhuanjiaitem.ruxuannianfen"></td>
                            <!--<td style="vertical-align: middle; text-align: center;" v-text="zhuanjiaitem.zhengjianleixing_text"></td>
                            <td style="vertical-align: middle; text-align: center;" v-text="zhuanjiaitem.zhengjianhaoma"></td>-->
                            <td style="vertical-align: middle; text-align: center;color:red;" v-if="zhuanjiaitem.zhuanjiazhuangtai=='5'" v-text="zhuanjiaitem.zhuanjiazhuangtai_text"></td>
                            <td style="vertical-align: middle; text-align: center;color:green" v-else-if="zhuanjiaitem.zhuanjiazhuangtai=='10'||zhuanjiaitem.zhuanjiazhuangtai=='11'||zhuanjiaitem.zhuanjiazhuangtai=='12'||zhuanjiaitem.zhuanjiazhuangtai=='13'" v-text="zhuanjiaitem.zhuanjiazhuangtai_text"></td>
                            <td style="vertical-align: middle; text-align: center;color:orange" v-else v-text="zhuanjiaitem.zhuanjiazhuangtai_text"></td>
                            <td style="vertical-align: middle; text-align: center;" v-text="zhuanjiaitem.zhuangtaibiandongshijian"></td>
                            <!--<td style="vertical-align: middle; text-align: center;" v-text=""></td>-->
                            <td style="vertical-align: middle; text-align: center;" v-text=""></td>
                            <td style="vertical-align: middle; text-align: center;" v-text="">
                                <button class="btn btn-warning btn-rounded btn-sm" @click="toModify(zhuanjiaitem.zhuanjiaid)">修改</button>
                            </td>
                        </tr>
                        <tr v-if="zhuanjialist.length == 0">
                            <td style="text-align: center; vertical-align: middle" colspan="10">查无数据</td>
                        </tr>
                    </tbody>
                </table>

                <div v-if="recordCount != '0'" class="my-page-navigation" style="text-align:center;">
                    <button class="btn btn-default" @click="firstPage">首页</button>
                    <button class="btn btn-default" @click="prePage">上一页</button>
                    <select class="custom-select border-secondary" v-model="pagesize">
                        <option value="10">10 条/页</option>
                        <option value="20">20 条/页</option>
                        <option value="30">30 条/页</option>
                        <option value="50">50 条/页</option>
                    </select>
                    <span v-text="pageindex + '  /  ' + pageCount" style="border-color: #6c757d"></span>
                    <span v-text="'共' + recordCount + '条'" style="border-color: #6c757d"></span>
                    <button class="btn btn-default" @click="nextPage">下一页</button>
                    <button class="btn btn-default" @click="lastPage">尾页</button>
                    <span style="border-color: #6c757d">跳到第</span>
                    <input type="text" class="form-control border-secondary" style="width:50px;display:inline;" v-model="targetpage" @keyup.enter="targetPage">
                    <span style="border-color: #6c757d">页</span>
                    <button class="btn btn-default" @click="targetPage">跳</button>
                </div>

            </div>

            <!-- 编辑专家信息 -->
            <div th:replace="system/zhuanjia/modal_edit::zhuanjia_edit"></div>

        </div>
    </div>
    <th:block th:include="include :: footer" />
     <script th:src="@{/js/system/zhuanjia/customzhuanjia.js?v=1.1}"></script>

     <!-- 编辑专家信息 -->
     <div th:replace="system/biandonghistory/modal_history::history_list"></div>

</body>
</html>